rbtree: Add gtk_rb_tree_node_get_tree()
authorBenjamin Otte <otte@redhat.com>
Mon, 14 Jan 2019 00:55:23 +0000 (01:55 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 14 Jan 2019 01:14:11 +0000 (02:14 +0100)
commit6a3c2a230a4d1ef9f8c356cc5f24fbb202172e0c
treedb2f2615f9ed175115aabf966c9c0bee0d5daad9
parenta33ff4c6ab3a196b3c71da48e4e650da85d1691c
rbtree: Add gtk_rb_tree_node_get_tree()

Store a link to the tree in the root node. This allows looking up the
tree in O(log N) from the node without any extra memory usage.

This is useful because code can just store a pointer to the node and
doesn't need to keep the tree pointer around. And that can (for large
trees) save quite a bit of memory.
gtk/gtkrbtree.c
gtk/gtkrbtreeprivate.h